<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>总体幸福感测试</title>
    <!-- 引入 vant UI 组件库样式文件 -->
    <link rel="stylesheet" href="../../../common/css/vant-index.css" />
    <style rel="stylesheet">
        body {
            background-color: #f7f8fa;
        }

        a {
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        }

        a:-webkit-any-link {
            color: #eee;
        }

        .container {
            border: 1px solid #f5f5f5;
            box-shadow: -1px 5px 5px #ececec;
            border-radius: 10px;
            margin: 0.6rem;
            padding: 0;
        }

        .van-cell__title {
            flex: 2;
        }

        #lists {
            margin-top: 0.2rem;
            font-size: 1rem;
            font-weight: 350;
            color: #8c8b8c;
            text-align: left;
        }

        .van-cell-group--inset {
            margin: 0;
        }

        .tab-btn {
            margin: 0.2rem;
            height: 1.7rem;
            line-height: 1.7rem;
        }

        #tabs-title {
            background-color: #11428c;
            display: flex;
        }

        #left-btn {
            flex: 1;
        }

        #right-btn {
            margin-right: 0.5rem;
        }


        .evalution_value {
            height: 3rem;
            width: 100%;
            background-color: #E22E30;
            text-align: center;
            line-height: 3rem;
            bottom: 0;
            margin-top: 3rem;
            margin-bottom: 0.5rem;
        }

        .van-button::before {
            background-color: red;
        }

        .evalution_button {
            margin: 0.2rem 0.2rem;
        }

        .evalution_button_list {
            margin: 0.2rem 0.2rem;
            width: 45%;
        }

        .bgcolor {
            background-color: #E22E30;
            color: #fff;
        }
		
		.bgcolorred {
		    background-color: #E22E30;
		    color: #fff;
		}
		.bgcolorblue {
		    background-color: #005BAC;
		    color: #fff;
		}
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <van-nav-bar v-if='from!="weapp"' title="总体幸福感测试" left-text="返回" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
            <template #right>
                <van-icon name="wap-home-o" size='18' />
            </template>
        </van-nav-bar>
        <div class="container" :class="from=='weapp'?'padding-bottom':''">
            <span>1 你的总体感觉怎样(在过去的一个月里)?</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=0,getButtonChange(0)">好极了
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=1,getButtonChange(1)">精神很好
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=2,getButtonChange(2)">精神不错
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=3,getButtonChange(3)">精神时好时坏
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=4,getButtonChange(4)">精神不好
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio1=5,getButtonChange(5)">精神很不好
                </van-button>


            </div>
            <span>2 你是否为自己的神经质或“神经病”感到烦恼(在过去的一个月里)?</span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=0,getButtonChange1(0)">极端烦恼
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=1,getButtonChange1(1)">相当烦恼
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=2,getButtonChange1(2)">有些烦恼
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=3,getButtonChange1(3)">很少烦恼
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod1==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio2=4,getButtonChange1(4)">一点也不烦恼
                </van-button>

            </div>
            <span>3 你是否一直牢牢地控制着自己的行为、思维、情感或感觉(在过去的一个月里)?
            </span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=0,getButtonChange2(0)">绝对的
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=1,getButtonChange2(1)">大部分是的
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=2,getButtonChange2(2)">一般来说是的
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=3,getButtonChange2(3)">控制的不太好
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=4,getButtonChange2(4)">有些混乱
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod2==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio3=5,getButtonChange2(5)">非常混乱
                </van-button>


            </div>
            <span>4 你是否由于悲哀、失去信心、失望或有许多麻烦而怀疑还有任何事情值得去做(在过去的一
                月里)?

            </span>
            <div class="evalution_button">
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=0,getButtonChange3(0)">极端怀疑
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=1,getButtonChange3(1)">非常怀疑
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=2,getButtonChange3(2)">相当怀疑
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=3,getButtonChange3(3)">有些怀疑
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=4,getButtonChange3(4)">略些怀疑
                </van-button>
                <van-button round class="evalution_button_list" :class="statisticsPeriod3==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                    @click="this.radios.radio4=5,getButtonChange3(5)">一点也不怀疑
                </van-button>


            </div>
        </div>
        <span>5 你是否正在受到或曾经受到任何约束、刺激或压力(在过去的一个月里)?</span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod4==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio5=0,getButtonChange4(0)">相当多
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod4==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio5=1,getButtonChange4(1)">不少
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod4==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio5=2,getButtonChange4(2)">有些
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod4==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio5=3,getButtonChange4(3)">不多
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod4==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio5=4,getButtonChange4(4)">没有
            </van-button>


        </div>
        <span>6 你的生活是否幸福、满足或愉快(在过去的一个月里)?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod5==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio6=0,getButtonChange5(0)">非常幸福
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod5==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio6=1,getButtonChange5(1)">相当幸福
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod5==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio6=2,getButtonChange5(2)">满足
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod5==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio6=3,getButtonChange5(3)">略有些不满足
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod5==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio6=4,getButtonChange5(4)">非常不满足
            </van-button>

        </div>
        <span>7 你是否有理由怀疑自己曾经失去理智、或对行为、谈话、思维或记忆失去控制(在过去的一
            个月里)?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod6==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio7=0,getButtonChange6(0)">一点也没有
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod6==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio7=1,getButtonChange6(1)">只有一点点
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod6==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio7=2,getButtonChange6(2)">有些，不严重
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod6==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio7=3,getButtonChange6(3)">有些，相当严重
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod6==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio7=3,getButtonChange6(4)">是的，非常严重
            </van-button>

        </div>
        <span>8 你是否感到焦虑、担心或不安(在过去的一个月里)?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod7==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio8=0,getButtonChange7(0)">极端严重
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod7==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio8=1,getButtonChange7(1)">非常严重
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod7==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio8=2,getButtonChange7(2)">相当严重
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod7==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio8=3,getButtonChange7(3)">有些
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod7==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio8=4,getButtonChange7(4)">很少
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod7==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio8=5,getButtonChange7(5)">无
            </van-button>



        </div>
        <span>9 你睡醒之后是否感到头脑清晰和精力充沛(在过去的一个月里)?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod8==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio9=0,getButtonChange8(0)">天天如此
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod8==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio9=1,getButtonChange8(1)">几乎天天
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod8==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio9=2,getButtonChange8(2)">相当频繁
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod8==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio9=3,getButtonChange8(3)">不多
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod8==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio9=4,getButtonChange8(4)">很少
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod8==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio9=5,getButtonChange8(5)">无
            </van-button>
        </div>
        <span>10 你是否因为疾病、身体的不适、疼痛或对患病的恐惧而烦恼(在过去一个月里)?</span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod9==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio10=0,getButtonChange9(0)">所有的时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod9==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio10=1,getButtonChange9(1)">大部分时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod9==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio10=2,getButtonChange9(2)">很多时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod9==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio10=3,getButtonChange9(3)">有时
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod9==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio10=4,getButtonChange9(4)">偶尔
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod9==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio10=5,getButtonChange9(5)">无
            </van-button>

        </div>
        <span>11 你每天的生活中是否充满了让你感兴趣的事情(在过去的一个月里)?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod10==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio11=0,getButtonChange10(0)">所有的时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod10==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio11=1,getButtonChange10(1)">大部分时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod10==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio11=2,getButtonChange10(2)">很多时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod10==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio11=3,getButtonChange10(3)">有时
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod10==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio11=4,getButtonChange10(4)">偶尔
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod10==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio11=5,getButtonChange10(5)">无
            </van-button>

        </div>
        <span>12 你是否感到沮丧和忧郁(在过去的一个月里)?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod11==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio12=0,getButtonChange11(0)">所有的时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod11==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio12=1,getButtonChange11(1)">大部分时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod11==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio12=2,getButtonChange11(2)">很多时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod11==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio12=3,getButtonChange11(3)">有时
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod11==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio12=4,getButtonChange11(4)">偶尔
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod11==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio12=5,getButtonChange11(5)">无
            </van-button>

        </div>
        <span>13 你是否情绪稳定并能把握住自己(在过去的一个月里)?

        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod12==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio13=0,getButtonChange12(0)">所有的时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod12==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio13=1,getButtonChange12(1)">大部分时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod12==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio13=2,getButtonChange12(2)">很多时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod12==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio13=3,getButtonChange12(3)">有时
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod12==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio13=4,getButtonChange12(4)">偶尔
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod12==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio13=5,getButtonChange12(5)">无
            </van-button>
        </div>
        <span>14 你是否感到疲劳、过累、无力或筋疲力竭(在过去的一个月里)?



        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod13==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio14=0,getButtonChange13(0)">所有的时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod13==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio14=1,getButtonChange13(1)">大部分时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod13==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio14=2,getButtonChange13(2)">很多时间
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod13==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio14=3,getButtonChange13(3)">有时
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod13==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio14=4,getButtonChange13(4)">偶尔
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod13==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio14=5,getButtonChange13(5)">无
            </van-button>
        </div>
        <span>15 你对自己健康关心或担忧的程度如何(在过去的一个月里)，请选择程度，分数越高，关心
            程度越高，0 表示不关心，10 表示非常关心?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod14==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio15=0,getButtonChange14(0)">0
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod14==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio15=1,getButtonChange14(1)">1
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod14==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio15=2,getButtonChange14(2)">2
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod14==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio15=3,getButtonChange14(3)">3
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod14==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio15=4,getButtonChange14(4)">4
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod14==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio15=5,getButtonChange14(5)">5
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod14==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio15=6,getButtonChange14(6)">6
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod14==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio15=7,getButtonChange14(7)">7
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod14==8?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio15=8,getButtonChange14(8)">8
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod14==9?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio15=9,getButtonChange14(9)">9
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod14==10?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio15=10,getButtonChange14(10)">10
            </van-button>


        </div>
        <span>16 你感到放松或紧张的程度如何(在过去的一个月里)，请选择程度，分数越高，紧张程度越
            高，0 表示松弛，10 表示非常紧张?

        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod15==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio16=0,getButtonChange15(0)">0
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod15==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio16=1,getButtonChange15(1)">1
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod15==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio16=2,getButtonChange15(2)">2
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod15==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio16=3,getButtonChange15(3)">3
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod15==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio16=4,getButtonChange15(4)">4
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod15==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio16=5,getButtonChange15(5)">5
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod15==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio16=6,getButtonChange15(6)">6
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod15==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio16=7,getButtonChange15(7)">7
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod15==8?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio16=8,getButtonChange15(8)">8
            </van-button>
            <van-button round class="evalution_button_list"
                :class="statisticsPeriod15statisticsPeriod15==9?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio16=9,getButtonChange15(9)">9
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod15==10?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio16=10,getButtonChange15(10)">10
            </van-button>

        </div>
        <span>17 你感觉自己的精力、精神和活力如何(在过去的一个月里)，请选择程度，分数越高，精力
            程度越高，0 表示没精力，10 表示精力充沛

        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod16==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio17=0,getButtonChange16(0)">0
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod16==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio17=1,getButtonChange16(1)">1
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod16==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio17=2,getButtonChange16(2)">2
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod16==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio17=3,getButtonChange16(3)">3
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod16==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio17=4,getButtonChange16(4)">4
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod16==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio17=5,getButtonChange16(5)">5
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod16==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio17=6,getButtonChange16(6)">6
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod16==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio17=7,getButtonChange16(7)">7
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod16==8?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio17=8,getButtonChange16(8)">8
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod16==9?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio17=9,getButtonChange16(9)">9
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod16==10?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio17=10,getButtonChange16(10)">10
            </van-button>
        </div>
        <span>18 你忧郁或快乐的程度如何(在过去的一个月里)，请选择程度，分数越高，快乐程度越高，0
            表示非常犹豫，10 表示非常快乐?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod17==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio18=0,getButtonChange17(0)">0
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod17==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio18=1,getButtonChange17(1)">1
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod17==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio18=2,getButtonChange17(2)">2
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod17==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio18=3,getButtonChange17(3)">3
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod17==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio18=4,getButtonChange17(4)">4
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod17==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio18=5,getButtonChange17(5)">5
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod17==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio18=6,getButtonChange17(6)">6
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod17==7?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio18=7,getButtonChange17(7)">7
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod17==8?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio18=8,getButtonChange17(8)">8
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod17==9?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio18=9,getButtonChange17(9)">9
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod17==10?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio18=10,getButtonChange17(10)">10
            </van-button>
        </div>
        <span>19 你是否由于严重的性格、情感、行为或精神问题而感到需要帮助(在过去的一年里)?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod18==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio19=0,getButtonChange18(0)">是的，曾寻求帮助
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod18==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio19=1,getButtonChange18(1)">是的，但未寻求帮助
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod18==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio19=2,getButtonChange18(2)">有严重的问题
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod18==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio19=3,getButtonChange18(3)">几乎没有问题
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod18==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio19=4,getButtonChange18(4)">没有问题
            </van-button>

        </div>
        <span>20 你是否曾感到将要精神崩溃或接近于精神崩溃?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod19==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio20=0,getButtonChange19(0)">是的，在过去的一年里
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod19==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio20=1,getButtonChange19(1)">是的，在过去的一年以前
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod19==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio20=2,getButtonChange19(2)">无
            </van-button>
        </div>
        <span>21 你是否曾有过精神崩溃?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod20==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio21=0,getButtonChange20(0)">是的，在过去的一年里
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod20==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio21=1,getButtonChange20(1)">是的，在过去的一年以前
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod20==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio21=2,getButtonChange20(2)">无
            </van-button>
        </div>
        <span>22 你是否曾因为性格、情感、行为或精神问题在精神病院、综合医院精神病科病房或精神卫生诊所治疗?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod21==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio22=0,getButtonChange21(0)">是的，在过去的一年里
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod21==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio22=1,getButtonChange21(1)">是的，在过去的一年以前
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod21==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio22=2,getButtonChange21(2)">无
            </van-button>
        </div>
        <span>23 你是否曾因为性格、情感、行为或精神问题求助于精神医生、心理学家?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod22==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio23=0,getButtonChange22(0)">是的，在过去的一年里
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod22==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio23=1,getButtonChange22(1)">是的，在过去的一年以前
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod22==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio23=2,getButtonChange22(2)">无
            </van-button>
        </div>
        <span>24 你是否因自己的一些问题求助于普通医生(真正的躯体疾病或常规检查除外)?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod23==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio24=0,getButtonChange23(0)">是
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod23==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio24=1,getButtonChange23(1)">否
            </van-button>

        </div>
        <span>25 你是否因自己的一些问题求助于脑科或神经外科专家?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod24==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio25=0,getButtonChange24(0)">是
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod24==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio25=1,getButtonChange24(1)">否
            </van-button>

        </div>
        <span>26 你是否因自己的一些问题求助于护士(一般内科疾病除外)?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod25==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio26=0,getButtonChange25(0)">是
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod25==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio26=1,getButtonChange25(1)">否
            </van-button>

        </div>
        <span>27 你是否因自己的一些问题求助于律师(常规的法律问题除外)?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod26==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio27=0,getButtonChange26(0)">是
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod26==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio27=1,getButtonChange26(1)">否
            </van-button>

        </div>
        <span>28 你是否因自己的一些问题求助于警察(单纯的交通违章除外)?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod27==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio28=0,getButtonChange27(0)">是
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod27==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio28=1,getButtonChange27(1)">否
            </van-button>

        </div>
        <span>29 你是否因自己的一些问题求助于牧师、神父等各种神职人员?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod28==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio29=0,getButtonChange28(0)">是
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod28==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio29=1,getButtonChange28(1)">否
            </van-button>

        </div>
        <span>30 你是否因自己的一些问题求助于婚姻咨询专家?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod29==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio30=0,getButtonChange29(0)">是
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod29==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio30=1,getButtonChange29(1)">否
            </van-button>

        </div>
        <span>31 你是否因自己的一些问题求助于社会工作者?

        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod30==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio31=0,getButtonChange30(0)">是
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod30==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio31=1,getButtonChange30(1)">否
            </van-button>

        </div>
        <span>32 你是否因自己的一些问题寻求过其它正式的帮助?

        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod31==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio32=0,getButtonChange31(0)">是
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod31==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio32=1,getButtonChange31(1)">否
            </van-button>

        </div>
        <span>33 你是否曾与家庭成员或朋友谈论自己的问题?
        </span>
        <div class="evalution_button">
            <van-button round class="evalution_button_list" :class="statisticsPeriod32==0?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio33=0,getButtonChange32(0)">是的，很有帮助
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod32==1?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio33=1,getButtonChange32(1)">是的，有些帮助
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod32==2?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio33=2,getButtonChange32(2)">是的，但没有帮助
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod32==3?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio33=3,getButtonChange32(3)">否，没有人可与之谈论
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod32==4?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio33=4,getButtonChange32(4)">否，没有人愿意与我谈论
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod32==5?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio33=5,getButtonChange32(5)">否，不愿与人谈论
            </van-button>
            <van-button round class="evalution_button_list" :class="statisticsPeriod32==6?(from=='weapp'?'bgcolorblue':'bgcolorred'):''"
                @click="this.radios.radio33=6,getButtonChange32(6)">没有问题
            </van-button>

        </div>

        <div class="evalution_value" @click="postHappiness" v-if="status==true&&from==''">
            <span style="color: #f3f3f3;">提交问卷</span>
        </div>
        <div class="evalution_value" style="background-color: #005BAC;" @click="postHappiness" v-if="status==true&&from=='weapp'">
            <span style="color: #f3f3f3;">提交问卷</span>
        </div>


    </div>
    </div>
</body>
<!-- 上线环境用 -->
<script src="../../../common/js/vue.global.prod.js"></script>
<!-- 引入 UI 组件库 -->
<script src="../../../common/js/vant.min.js"></script>
<!-- axios 接口调用 -->
<script src="../../../common/js/axios.min.js"></script>
<script src="../../../base.js"></script>
<script src="../../../common/js/url.min.js"></script>

<script type="module">

    import {
        getAction,
        postAction,
        getUrl,
    } from "../../../common/js/api/vue3-axios-utils.js";
    const PatientData = {
        data() {
            return {
                url: {
                    postHappiness: "/105/45/1054501",
                    getHappinessInfo: "/105/45/1054502",

                },
                status: true,
                currentData: {},
                statisticsPeriod: null,
                statisticsPeriod1: null,
                statisticsPeriod2: null,
                statisticsPeriod3: null,
                statisticsPeriod4: null,
                statisticsPeriod5: null,
                statisticsPeriod6: null,
                statisticsPeriod7: null,
                statisticsPeriod8: null,
                statisticsPeriod9: null,
                statisticsPeriod10: null,
                statisticsPeriod11: null,
                statisticsPeriod12: null,
                statisticsPeriod13: null,
                statisticsPeriod14: null,
                statisticsPeriod15: null,
                statisticsPeriod16: null,
                statisticsPeriod17: null,
                statisticsPeriod18: null,
                statisticsPeriod19: null,
                statisticsPeriod20: null,
                statisticsPeriod21: null,
                statisticsPeriod22: null,
                statisticsPeriod23: null,
                statisticsPeriod24: null,
                statisticsPeriod25: null,
                statisticsPeriod26: null,
                statisticsPeriod27: null,
                statisticsPeriod28: null,
                statisticsPeriod29: null,
                statisticsPeriod30: null,
                statisticsPeriod31: null,
                statisticsPeriod32: null,


                radios: {
                    radio1: null,
                    radio2: null,
                    radio3: null,
                    radio4: null,
                    radio5: null,
                    radio6: null,
                    radio7: null,
                    radio8: null,
                    radio9: null,
                    radio10: null,
                    radio11: null,
                    radio12: null,
                    radio13: null,
                    radio14: null,
                    radio15: null,
                    radio16: null,
                    radio17: null,
                    radio18: null,
                    radio19: null,
                    radio20: null,
                    radio21: null,
                    radio22: null,
                    radio23: null,
                    radio24: null,
                    radio25: null,
                    radio26: null,
                    radio27: null,
                    radio28: null,
                    radio29: null,
                    radio30: null,
                    radio31: null,
                    radio32: null,
                    radio33: null,



                },
				patientId:'',
				from:''
            };
        },


        methods: {
            getButtonChange(value) {
                this.statisticsPeriod = value;
            },
            getButtonChange1(value) {
                this.statisticsPeriod1 = value;
            },
            getButtonChange2(value) {
                this.statisticsPeriod2 = value;
            },
            getButtonChange3(value) {
                this.statisticsPeriod3 = value;
            },
            getButtonChange4(value) {
                this.statisticsPeriod4 = value;
            },
            getButtonChange5(value) {
                this.statisticsPeriod5 = value;
            },
            getButtonChange6(value) {
                this.statisticsPeriod6 = value;
            },
            getButtonChange7(value) {
                this.statisticsPeriod7 = value;
            },
            getButtonChange8(value) {
                this.statisticsPeriod8 = value;
            },
            getButtonChange9(value) {
                this.statisticsPeriod9 = value;
            },
            getButtonChange10(value) {
                this.statisticsPeriod10 = value;
            },
            getButtonChange11(value) {
                this.statisticsPeriod11 = value;
            },
            getButtonChange12(value) {
                this.statisticsPeriod12 = value;
            },
            getButtonChange13(value) {
                this.statisticsPeriod13 = value;
            },
            getButtonChange14(value) {
                this.statisticsPeriod14 = value;
            },
            getButtonChange15(value) {
                this.statisticsPeriod15 = value;
            },
            getButtonChange16(value) {
                this.statisticsPeriod16 = value;
            },
            getButtonChange17(value) {
                this.statisticsPeriod17 = value;
            },
            getButtonChange18(value) {
                this.statisticsPeriod18 = value;
            },
            getButtonChange19(value) {
                this.statisticsPeriod19 = value;
            },
            getButtonChange20(value) {
                this.statisticsPeriod20 = value;
            },
            getButtonChange21(value) {
                this.statisticsPeriod21 = value;
            },
            getButtonChange22(value) {
                this.statisticsPeriod22 = value;
            },
            getButtonChange23(value) {
                this.statisticsPeriod23 = value;
            },
            getButtonChange24(value) {
                this.statisticsPeriod24 = value;
            },
            getButtonChange25(value) {
                this.statisticsPeriod25 = value;
            },
            getButtonChange26(value) {
                this.statisticsPeriod26 = value;
            },
            getButtonChange27(value) {
                this.statisticsPeriod27 = value;
            },
            getButtonChange28(value) {
                this.statisticsPeriod28 = value;
            },
            getButtonChange29(value) {
                this.statisticsPeriod29 = value;
            },
            getButtonChange30(value) {
                this.statisticsPeriod30 = value;
            },
            getButtonChange31(value) {
                this.statisticsPeriod31 = value;
            },
            getButtonChange32(value) {
                this.statisticsPeriod32 = value;
            },
            onClickLeft() {
                window.location.href = './happinessInfo.html'
            },
            onClickRight() {
                window.location.href = '../../index.html?userid=' + localStorage.pid
            },




            getPatientId() {
                let patientId = this.patientId
            },

            async postHappiness() {

                let inputs = [];
                for (let i in this.radios) {
                    inputs.push(this.radios[i]);

                }
                for (let k in inputs) {
                    if (inputs[k] == null) {
                        vant.Toast.fail('请填写所有选项!');
                    }
                    break
                }



                let url =
                    getUrl() + this.url.postHappiness;
				let patientId = this.patientId
                let params = {
                    // 患者 ID 从本地存储空间的 pid 获得
                    patientId: patientId,
                    input: inputs

                };
                const res = await postAction(url, params);
                if (res.data.success) {
                    vant.Toast.success('评估完成,3秒后查看结果');
                    // 定时跳转
					if(this.from){
						setTimeout("javascript:history.go( -1 )", 3000);
					}else{
						setTimeout("javascript:location.href='./happinessInfo.html'", 3000);
					}
                    
                }
            },
        },
        created() {
			if(url('?from')=='weapp'){
				this.from = 'weapp'
			}
			if(url('?pid')){
				this.patientId = url('?pid')
			}else{
				this.patientId = localStorage.pid;
			}
            var status = window.location.search.slice(8,9)
            if (status == 1) {
                let patientId = this.patientId
                let params = {
                    patientId: patientId
                }
                

                let url =
                    getUrl() + this.url.getHappinessInfo;
                getAction(url, params).then((res) => {
                    console.log(res.data.result.answers);
                    this.statisticsPeriod = res.data.result.input[0],
                        this.statisticsPeriod1 = res.data.result.input[1],
                        this.statisticsPeriod2 = res.data.result.input[2],
                        this.statisticsPeriod3 = res.data.result.input[3],
                        this.statisticsPeriod4 = res.data.result.input[4],
                        this.statisticsPeriod5 = res.data.result.input[5],
                        this.statisticsPeriod6 = res.data.result.input[6],
                        this.statisticsPeriod7 = res.data.result.input[7],
                        this.statisticsPeriod8 = res.data.result.input[8],
                        this.statisticsPeriod9 = res.data.result.input[9],
                        this.statisticsPeriod10 = res.data.result.input[10],
                        this.statisticsPeriod11 = res.data.result.input[11],
                        this.statisticsPeriod12 = res.data.result.input[12],
                        this.statisticsPeriod13 = res.data.result.input[13],
                        this.statisticsPeriod14 = res.data.result.input[14],
                        this.statisticsPeriod15 = res.data.result.input[15],
                        this.statisticsPeriod16 = res.data.result.input[16],
                        this.statisticsPeriod17 = res.data.result.input[17],
                        this.statisticsPeriod18 = res.data.result.input[18],
                        this.statisticsPeriod19 = res.data.result.input[19],
                        this.statisticsPeriod20 = res.data.result.input[20],
                        this.statisticsPeriod21 = res.data.result.input[21],
                        this.statisticsPeriod22 = res.data.result.input[22],
                        this.statisticsPeriod23 = res.data.result.input[23],
                        this.statisticsPeriod24 = res.data.result.input[24],
                        this.statisticsPeriod25 = res.data.result.input[25],
                        this.statisticsPeriod26 = res.data.result.input[26],
                        this.statisticsPeriod27 = res.data.result.input[27],
                        this.statisticsPeriod28 = res.data.result.input[28],
                        this.statisticsPeriod29 = res.data.result.input[29],
                        this.statisticsPeriod30 = res.data.result.input[30],
                        this.statisticsPeriod31 = res.data.result.input[31],
                        this.statisticsPeriod32 = res.data.result.input[32],
                        this.status = false


                })



            }
            this.getPatientId()
        },

    };

    const app = Vue.createApp(PatientData);

    app.use(vant);
    // 通过 CDN 引入时不会自动注册 Lazyload 组件
    // 可以通过下面的方式手动注册
    app.use(vant.Lazyload);

    // 调用函数组件，弹出一个 Toast
    // vant.Toast("刷新成功");
    app.mount("#app");
</script>

</html>
